package day12;
//打印异常信息
public class demo6 {
    public static void a(){
        int a=10;
        int b=0;
        int c=a/b;
        System.out.println("结果："+c);
    }
    public static void b(){
        a();
    }
    public static void c(){
        b();
    }

    public static void main(String[] args) {
        try{
            c();
        }catch (Exception e){
            e.printStackTrace(); //打印异常堆栈信息
            String msg=e.getMessage();
            System.err.println(msg);
            System.out.println("打印错误信息！");
        }
        System.out.println("程序执行结束！");

    }
}
